﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%set string category_title=get_category_title(category_id,"图片分享")%>
<title>{category_title} - {config.webname}</title>
<link rel="stylesheet" href="{config.webpath}css/pagination.css" />
<link media="screen" type="text/css" href="<%templateskin%>/css/style.css" rel="stylesheet">
<script type="text/javascript" src="{config.webpath}scripts/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<%templateskin%>/js/base.js"></script>
</head>

<body>
<!--Header-->
<%template src="_header.html"%>
<!--/Header-->

<div class="boxwrap">
  <div class="left710">
   <!--Content-->
    <div class="main_box">
      <%set string category_nav=get_category_menu("photo_list", category_id)%>
      <dl class="head green">
        <dt>图片分享</dt>
        <dd>
          <span>当前位置：<a href="<%linkurl("index")%>">首页</a> &gt; <a href="<%linkurl("photo")%>">图片分享</a>{category_nav}</span>
        </dd>
      </dl>
      <div class="clear"></div>
      <h1 class="base_tit">分类“{category_title}”的内容</h1>
      <div class="photo_list">
        <ul>
          <%set DataTable photo_list=get_article_list("photo", category_id, page, "status=0", out totalcount, out pagelist, "photo_list", category_id, "__id__")%><!--取得一个分页DataTable-->
          <%foreach(DataRow dr in photo_list.Rows)%>
          <li>
            <a class="img" href="<%linkurl("photo_show",{dr[id]})%>" title="{dr[title]}">
              <img src="{dr[img_url]}" alt="{dr[title]}" />
              <div class="info">
                <h4>{dr[title]}</h4>
                <p>{dr[zhaiyao]}</p>
              </div>
            </a>
          </li>
          <%/foreach%>
        </ul>
      </div>
      <div class="line20"></div>
      <div class="flickr">{pagelist}</div> <!--放置页码列表-->
    </div>
    <!--/Content-->
  </div>
  
  <div class="left264">
    <!--Sidebar-->
    <div class="sidebar">
      <h3>图片类别</h3>
      <ul>
        <%set DataTable category_list=get_category_list("photo", 0)%>
        <%foreach(DataRow dr in category_list.Rows)%>
        <li><a title="{dr[title]}" href="<%linkurl("photo_list",{dr[id]})%>">{dr[title]}</a></li>
        <%/foreach%>
      </ul>
      <h3>推荐图片</h3>
      <div class="focus_list">
        <ul>
          <%set DataTable redphoto=get_article_list("photo", 0, 6, "is_red=1 and img_url<>''")%>
          <%foreach(DataRow dr in redphoto.Rows)%>
          <li>
            <a title="{dr[title]}" href="<%linkurl("photo_show",{dr[id]})%>">
              <img src="{dr[img_url]}" width="100" height="100" alt="{dr[title]}" />
              <span>{dr[title]}</span>
            </a>
          </li>
          <%/foreach%>
        </ul>
        <div class="clear"></div>
      </div>
      <h3>人气排行</h3>
      <ul class="rank_list">
        <%set DataTable hotphoto=get_article_list("photo", 0, 10, "", "click desc,id desc")%>
        <%loop hotdr hotphoto%>
        <%if(hotdr__loop__id==1)%>
        <li class="active">
        <%else%>
        <li>
        <%/if%>
          <span><%datetostr({hotdr[add_time]},MM-dd)%></span>
          <i class="num"><%write hotdr__loop__id%></i><a href="<%linkurl("photo_show",{hotdr[id]})%>">{hotdr[title]}</a>
        </li>
        <%/loop%>
      </ul>
    </div>
    <!--/Sidebar-->
  </div>
</div>

<div class="clear"></div>

<!--Footer-->
<%template src="_footer.html"%>
<!--/Footer-->
</body>
</html>
